#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QDebug>
#include <QMessageBox>

namespace Ui {
class Widget;
}

class MyObject : public QObject {
    Q_OBJECT

public slots:
    void doSomething(const QString &data)
    {
        QMessageBox::information(nullptr, tr("From web call"), data, QMessageBox::Ok);
    }
};

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();

private:
    Ui::Widget *ui;

protected slots:
    void OnLoadFinished(bool result);
    void on_btncalljs_clicked();
    void OnJavaScriptWindowObjectCleared();

private:
    bool renderImage();
    void CallJsFunction();

};

#endif // WIDGET_H
